<?php
header ( 'Content-Type:text/html; charset=UTF-8' );
$pdo = new PDO ( 'mysql:dbname=crm; charset=utf8', 'root' );
$s = $pdo->prepare ( 'select * from zdkh' );
$s->execute ();
$data = $s->fetchAll ( PDO::FETCH_NAMED );
$dom1="";
foreach ($data as $value) {
     $dom1.='<tr class="atr"><td>'.$value['name'].'</td><td>'.$value['xm'].'</td><td>'.$value['sf'].'</td><td>'.$value['tel'].'</td><td>'.$value['dizhi'].'<a class="sczdkh" id="'.$value['id'].'" href="#">删除</a></td></tr>';

}
echo json_encode ( array (
		'zddom' => $dom1
) );
